<template>
  <div>
    <div v-for="(item, index) in habbies" :key="item" style="display: inline-block">
      <label :for="index">
        <input type="checkbox" :value="item" v-model="myHabbies" :id="index">{{item}}
      </label>
    </div>
    <ul v-if="myHabbies.length">
      <li v-for="item in myHabbies" :key="item">{{item}}</li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'MyLike',
  data(){
    return {
      habbies: ["科幻", "喜剧", "动漫", "冒险", "科技", "军事", "娱乐", "奇闻"],
      myHabbies: []
    }
  }
}
</script>

<style>

</style>